package Servlet;

import Dao.scheduleDao;
import bean.doctor_schedule;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

@WebServlet(urlPatterns = "/scheduleServlet")

public class scheduleServlet extends BaseServlet{
    scheduleDao dao = new scheduleDao();

    protected void list(HttpServletRequest req, HttpServletResponse resp) throws Exception {
        List<doctor_schedule> schedules = dao.querySchedulesByWeek("星期三");
        req.setAttribute("schedules",schedules);
        req.getRequestDispatcher("/Scheduling_information.jsp").forward(req,resp);
    }

    protected void scheduleByName(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        super.doGet(req, resp);
    }
    protected void scheduleByOffice(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        super.doGet(req, resp);
    }

}
